/* 全局样式文件 */

/* 重置样式 */
* {
  box-sizing: border-box;
}

html, body {
  margin: 0;
  padding: 0;
  height: 100%;
  width: 100%;
  font-family: 'Helvetica Neue', Helvetica, 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', '微软雅黑', Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  color: #333;
}

/* 编辑器相关样式 */
.editor-container {
  display: flex;
  height: 100%;
  width: 100%;
  overflow: hidden;
}

/* 辅助线样式 */
.guide-line {
  position: absolute;
  background-color: #409eff;
  z-index: 9999;
  pointer-events: none;
  
  &.horizontal {
    height: 1px;
    width: 100%;
  }
  
  &.vertical {
    width: 1px;
    height: 100%;
  }
}

/* 组件选中样式 */
.component-selected {
  outline: 2px solid #409eff;
  outline-offset: 1px;
}

/* 拖拽时的样式 */
.dragging {
  opacity: 0.7;
  cursor: move;
}

/* 拖拽放置区域样式 */
.drop-zone {
  min-height: 50px;
  border: 1px dashed #ccc;
  background-color: rgba(0, 0, 0, 0.02);
  
  &.drop-active {
    border-color: #409eff;
    background-color: rgba(64, 158, 255, 0.1);
  }
}

/* 工具栏样式 */
.toolbar {
  display: flex;
  align-items: center;
  padding: 8px 16px;
  background-color: #fff;
  border-bottom: 1px solid #e0e0e0;
  
  .toolbar-item {
    margin-right: 12px;
    cursor: pointer;
    
    &:hover {
      color: #409eff;
    }
  }
}

/* 属性面板样式 */
.property-panel {
  width: 300px;
  border-left: 1px solid #e0e0e0;
  background-color: #f9f9f9;
  overflow-y: auto;
  
  .panel-header {
    padding: 12px 16px;
    border-bottom: 1px solid #e0e0e0;
    
    h3 {
      margin: 0;
      font-size: 16px;
      font-weight: 600;
      color: #333;
    }
  }
  
  .panel-content {
    padding: 16px;
  }
  
  .property-item {
    margin-bottom: 16px;
    
    .property-label {
      font-size: 14px;
      color: #666;
      margin-bottom: 8px;
    }
  }
}

/* 按钮样式 */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 8px 16px;
  border: 1px solid #dcdfe6;
  border-radius: 4px;
  background-color: #fff;
  color: #606266;
  font-size: 14px;
  cursor: pointer;
  transition: all 0.2s;
  
  &:hover {
    color: #409eff;
    border-color: #c6e2ff;
    background-color: #ecf5ff;
  }
  
  &.primary {
    background-color: #409eff;
    border-color: #409eff;
    color: #fff;
    
    &:hover {
      background-color: #66b1ff;
      border-color: #66b1ff;
      color: #fff;
    }
  }
  
  &.danger {
    background-color: #f56c6c;
    border-color: #f56c6c;
    color: #fff;
    
    &:hover {
      background-color: #f78989;
      border-color: #f78989;
      color: #fff;
    }
  }
}

/* 表单样式 */
.form-item {
  margin-bottom: 18px;
  
  .form-label {
    font-size: 14px;
    color: #606266;
    margin-bottom: 8px;
    display: block;
  }
  
  .form-input {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid #dcdfe6;
    border-radius: 4px;
    transition: all 0.2s;
    
    &:focus {
      outline: none;
      border-color: #409eff;
    }
  }
}